package main

import (
	"github.com/wailsapp/wails/v3/pkg/application"
)

type GoService struct{}

func (g *GoService) OpenNewTopWindow(base64 string, width int, height int, time string) {
	cutWindow := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
		Title:            "截图展示",
		BackgroundColour: application.NewRGB(27, 38, 54),
		Width:            width,
		Height:           height,
		URL:              "/#/cut?time=" + time,
		AlwaysOnTop:      true,
		// Hidden:           true,
		Frameless:     true,
		DisableResize: true,
		// EnableDragAndDrop: true,
		// StartState:       application.WindowStateFullscreen,
	})
	cutWindow.EmitEvent("showCutImage", base64, time)
}
